package com.tcm.logistics.service.impl;

import com.tcm.logistics.dao.mapper.LogisticsWaybillItemsMapper;
import com.tcm.logistics.entity.LogisticsWaybillItems;
import com.tcm.logistics.service.LogisticsWaybillItemService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService(version = "0.0.1-alpha")
public class LogisticsWaybillItemServiceImpl implements LogisticsWaybillItemService {

    @Autowired
    private LogisticsWaybillItemsMapper logisticsWaybillItemsMapper;
    /**
     * 删除
     *
     * @param id
     * @return
     */
    @Override
    public int deleteByKey(Long id) {
        return logisticsWaybillItemsMapper.deleteByKey(id);
    }

    /**
     * 逻辑删除
     *
     * @param id
     * @return
     */
    @Override
    public int deleteLogicByKey(Long id) {
        return logisticsWaybillItemsMapper.deleteLogicByKey(id);
    }

    /**
     * 新增
     *
     * @param record
     * @return
     */
    @Override
    public int create(LogisticsWaybillItems record) {
        return logisticsWaybillItemsMapper.insert(record);
    }

    /**
     * 打印项
     *
     * @param shopId
     * @return
     */
    @Override
    public List<LogisticsWaybillItems> listBillItemsByShop(Long shopId) {
        return logisticsWaybillItemsMapper.listBillItemsByShop(shopId);
    }

    /**
     * 更新
     *
     * @param record
     * @return
     */
    @Override
    public int updateByKey(LogisticsWaybillItems record) {
        return logisticsWaybillItemsMapper.updateByKey(record);
    }
}
